/***************************************************
 @Name :        1196kk0
 @Time :        2025-05-26
 @Email :       2232506563@qq.com
 @Comment :     LED灯初始化与操作
 @FileName :    drivers_LED.h
 @Version :     4.0
****************************************************/
#ifndef __DRIVER_LED_H__
#define __DRIVER_LED_H__

/********** 头文件 **********/
#include "stm32f4xx.h"

/********** 宏定义 **********/
//LED ID
#define LED_ID_1    1
#define LED_ID_2    2
#define LED_ID_3    3
#define LED_ID_D2   4
//LED 时钟
#define LED_Clock_1     RCC_AHB1Periph_GPIOC
#define LED_Clock_2     RCC_AHB1Periph_GPIOC
#define LED_Clock_3     RCC_AHB1Periph_GPIOC
#define LED_Clock_D2    RCC_AHB1Periph_GPIOF
//LED 端口
#define LED_Port_1      GPIOC
#define LED_Port_2      GPIOC
#define LED_Port_3      GPIOC
#define LED_Port_D2     GPIOF
//LED 引脚
#define LED_Pin_1       GPIO_Pin_4
#define LED_Pin_2       GPIO_Pin_3
#define LED_Pin_3       GPIO_Pin_13
#define LED_Pin_D2      GPIO_Pin_8

/********* 声明函数 *********/
//LED初始化
void led_config(void);
//打开LED
void LED_ON(uint8_t LED_id);
//关闭LED
void LED_OFF(uint8_t LED_id);
//切换LED状态
void LED_Toggle(uint8_t LED_id);



#endif




